using DapperExtensionsNew.Configuration.AnalyzerOptions;
using System.Collections.Generic;

namespace DapperExtensionsNew.Configuration
{
	internal class SqlDatabaseOptionsFactory
	{
		private static readonly Dictionary<DbType, SqlDatabaseOptions> Factory;

		static SqlDatabaseOptionsFactory()
		{
			Factory = new Dictionary<DbType, SqlDatabaseOptions>
			{
				{
					DbType.SqlServer,
					new MsSqlDatabaseOptions()
				},
				{
					DbType.MySql,
					new MySqlDatabaseOptions()
				}
			};
		}

		public static SqlDatabaseOptions GetSqlDatabaseOptions(DbType analyzer)
		{
			Factory.TryGetValue(analyzer, out SqlDatabaseOptions value);
			return value;
		}
	}
}
